﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
   Администрация
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<%if (ViewBag.Users != null)
  { %>
  
    <table class="userTable">
        <tr>
            <td>
                <h4>UserName</h4>
            </td>
            <td>
                <h4>Дата регистрации</h4>
            </td>
            <td>
                <h4>E-mail</h4> 
            </td>
            <td>
            </td>
        </tr>
        <% foreach(MembershipUser user in ViewBag.Users) { %>
            <tr>
                <td>
                    <%: user.UserName %>
                </td>
                <td>
                    <%: user.CreationDate%>
                </td>
                <td>
                    <%: user.Email %>
                </td>
                <td> 
                    <%: Html.ActionLink("Удалить", "DeleteUser", new { UserName = user.UserName },
                    new { onclick = "return confirm('Вы уверены?')" })%>
                </td>
            </tr>
        <%} %>
    </table>
  
<%} %>
</asp:Content>
